<template>
  <div v-if="fileSrc">
    <iframe id="imgStyle_pdf" style="width:100%;height:100%;min-height:490px" :src="fileSrc" scrolling="no" frameborder="0"></iframe>
  </div>
</template>

<script>
export default {
  name: "WjbSilkWebIndex",
  props: {
    src: {
      type: String,
      default:
        "http://kt-beijing-1309195046.cos.ap-beijing.myqcloud.com/txKT/20220415/1514899114233491458-PPT.pdf",
    },
  },
  data() {
    return {
      fileSrc:''
    };
  },

  mounted() {
    //由于地址有可能名字包含中文,所以需要转码
    var downloadUrl = this.src;
    var url = encodeURIComponent(downloadUrl);
    url = "/PDFjs/web/viewer.html?file=" + url;
    this.fileSrc = url;
  },

  methods: {},
};
</script>

<style lang="scss" scoped>
</style>